package com.ktjy.goods.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * RealTimeService
 *
 * @author LILIBO
 * @since 2025/5/31
 */
@FeignClient(name = "real-time-service", url = "https://api.vvhan.com/api")
public interface FeignRealTimeService {

    /**
     * 获取天气信息
     *
     * @param city 城市
     * @return 天气信息
     */
    @GetMapping("/weather")
    Object weather(@RequestParam(value = "city", required = false) String city); // @RequestHeader("Authorization") 表示请求头参数; @RequestParam(value = "city", required = false) 表示请求参数; @RequestBody 表示请求体参数; @PathVariable 表示路径参数

}
